<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateInvestLogTable extends Migration {

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //投资经历标识
        Schema::create('invest_log', function(Blueprint $table)
        {
            $table->increments('id') ;                      //投资经历标识
            $table->unsignedInteger('user_id')->nullable(); //投资用户标识
            $table->unsignedInteger('org_id')->nullable();  //投资机构id
            $table->unsignedInteger('project_id') ;         //项目id
            $table->integer('money_num')->default(0);       //投资金额
            $table->string('money_desc')->nullable();       //金额描述
            $table->integer('stock_num')->default(0);       //占有股权
            $table->timestamp('invest_time')->nullable();   //投资时间
            $table->string('invest_account')->default(0);   //投资金额
            $table->string('money_type')->default('人民币'); //货币类型
            $table->integer('status')->default(0) ;         //投资状态
            $table->string('org_name')->nullable();         //投资机构名称
            $table->string('investor_name')->nullable();    //投资人名
            $table->unsignedInteger('is_lead')->default(0); //是否领投 1表示领投
            $table->unsignedInteger('is_online_finance')->default(0); //是否在线融资 1 表示在旁观者线上融资
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('invest_log') ;
    }

}
